<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="RibbonControl"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
	<DocumentationLinks>
		<Link Caption="MSDN: Walkthrough: Add a Button to the Server Ribbon" Url="http://msdn.microsoft.com/en-us/library/ff407458.aspx" Kind="Documentation"/>
		<Link Caption="MSDN: Server Ribbon XML" Url="http://msdn.microsoft.com/en-us/library/ff407290.aspx" Kind="Documentation"/>
		<Link Caption="MSDN: Default Server Ribbon Customization Locations" Url="http://msdn.microsoft.com/en-us/library/ee537543.aspx" Kind="Documentation"/>
	</DocumentationLinks>
	<xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
	<Caption>Ribbon Control</Caption>
	<Description>Adds a new control to an existing ribbon group (e.g. button, label)</Description>
	<HostData Priority="2020">
		<Icon File="Help/Icons/icon_CustomActions.ico" />
		<CommandBar Menu="SPSFProjectCustomActions"/>
		<CommandBar Menu="SPSFFolderCustomActions"/>
		<spsf:MetaData
		  Visible="true"
		  BindingType="ElementManifestReference"
		  BindingTypeTemplate="ElementManifestReferenceTemplate"
		  TestType="BaseSiteFeatureRecipeRunner"
		  Enabled="true"
		  CreateVSTemplate="true"
		  SharePointVersions="14"
      FeatureScopes="Web;Site;WebApplication;Farm"
		  Category="CustomActions" xmlns:spsf="http://www.spalmblogger.de">
			<spsf:Authors>
				<spsf:Author>Torsten Mandelkow</spsf:Author>
			</spsf:Authors>
			<spsf:VersionHistory>
				<spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
			</spsf:VersionHistory>
			<spsf:WebPageContent>
				<![CDATA[]]>
			</spsf:WebPageContent>
			<spsf:Test>
				<spsf:TestCases>
					<spsf:TestCase Name="DefaultRibbonControl" Type="SyntaxTestCase">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="RibbonActionName">DefaultRibbonControl</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
					</spsf:TestCase>
					<spsf:TestCase Name="RibbonControlWithPermissions" Type="SyntaxTestCase">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="RibbonActionName">RibbonControlWithPermissions</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="CustomActionRights">ManagePermissions;ManagePermissions;ManagePermissions|ViewLists;ViewLists;ViewLists</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
					</spsf:TestCase>
					<spsf:TestCase Name="RibbonControlWithButton" Type="SolutionTestCase">
						<spsf:TestCaseArguments>
							<spsf:TestCaseArgument Name="RibbonActionName">RibbonControlWithButton</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="RibbonActionTitle">Ribbon Button</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="RibbonControlType">Button</spsf:TestCaseArgument>
							<spsf:TestCaseArgument Name="RibbonCommandUIDefinitionLocation">Ribbon.Library.Actions;Ribbon.Library.Actions;Ribbon.Library.Actions</spsf:TestCaseArgument>
						</spsf:TestCaseArguments>
						<spsf:TestExpectedDeployResults>
							<spsf:TestExpectedDeployResult Type="ManualCheck">Document library page contains custom ribbon button in group actions http://demo2010a/Shared%20Documents/Forms/AllItems.aspx</spsf:TestExpectedDeployResult>
						</spsf:TestExpectedDeployResults>
					</spsf:TestCase>
				</spsf:TestCases>
			</spsf:Test>
		</spsf:MetaData>
	</HostData>
	<Arguments>

		<xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="BaseRibbonArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="BaseRibbonArgumentsComplete.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
		
		<Argument Name="RibbonCommandUIDefinitionLocation" Type="NameValueItem" Required="true" >
			<ValueProvider Type="DefaultNameValueItemProvider" Name="Ribbon.Library.Share" Value="Ribbon.Library.Share" />
		</Argument>	

		<Argument Name="RibbonControlType" Required="true" >
			<Converter Type="StringCollectionConverter" Values="Button;CheckBox;Label" />
			<ValueProvider Type="Evaluator" Expression="Button" />
		</Argument>
		<Argument Name="RibbonControlImage16" Required="true" >
			<ValueProvider Type="Evaluator" Expression="RibbonIcon_$(RibbonActionName)_16.gif" />
		</Argument>
		<Argument Name="RibbonControlImage32" Required="true" >
			<ValueProvider Type="Evaluator" Expression="RibbonIcon_$(RibbonActionName)_32.gif" />
		</Argument>

	</Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SharePointSoftwareFactory.Library" />
				<xi:include href="BaseRibbonPages.include"  parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/p:Pages/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
				<Page Height="350">
					<Title>Location Settings</Title>
					<Fields>
						<Field PanelType="SPALM.SharePointSoftwareFactory.Library.NameValueItemPanel, SPALM.SharePointSoftwareFactory.Library" ValueName="RibbonCommandUIDefinitionLocation" Label="Parent Ribbon Group" >
							<Help>Required Text. Specifies the existing ribbon group into which the new button should be added.</Help>
							<Editor Type="SPALM.SharePointSoftwareFactory.Library.RibbonGroupEditor, SPALM.SharePointSoftwareFactory.Library" />
						</Field>
					</Fields>
				</Page>
				<Page Height="350">
					<Title>Control Settings</Title>
					<Fields>
						<Field ValueName="RibbonControlType" Label="Type of Control">
							<Help>Required String. Specifies the type of control that should be added.</Help>
						</Field>
					</Fields>
				</Page>
			</Pages>
		</Wizard>
	</GatheringServiceData>

	<Actions CoordinatorServiceType="ConditionalCoordinator">

		<xi:include href="../../BaseStartingActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="BaseRibbonActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<!-- add button icon 16-->
		<Action
		  Name="AddIcon16"
		  Type="AddFileToItemAction"
		  DeploymentType="TemplateFile"
		  DeploymentPath="Images\$(SafeAppName)"
		  SourceFileName="Text/Ribbons/CustomAction16.gif"
		  TargetFileName="$(RibbonControlImage16)">
			<Input Name="ExcludeCondition" RecipeArgument="ProjectIsSandboxedSolution" />
      <Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
		</Action>

		<!-- add button icon 32-->
		<Action
		  Name="AddIcon32"
		  Type="AddFileToItemAction"
		  DeploymentType="TemplateFile"
		  DeploymentPath="Images\$(SafeAppName)"
		  SourceFileName="Text/Ribbons/CustomAction32.gif"
		  TargetFileName="$(RibbonControlImage32)">
			<Input Name="ExcludeCondition" RecipeArgument="ProjectIsSandboxedSolution" />
      <Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
		</Action>

		<xi:include href="../../BaseFinalActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />


	</Actions>

</Recipe>